package 实验四;

public class Tax {
	public static final double one=0.03;//税率
	public static final double two=0.1;
	public static final double three=0.2;
	public static final double four=0.25;
	public static final double five=0.3;
	public static final double six=0.35;
	public static final double seven=0.45;
	
	public static void shangshui (Student s){//总工资上税函数
		double m=0;
		int g=0;
		for(Lab l:s.lab){
			if(l!=null){
				g+=l.getgongzi();
			}
		}
		if(g<5000) {
			m=g;
		}
		else if(g<36000) {
			m=g-(g-5000)*one;
		}
		System.out.println("\n税前工资为："+g+"税后工资为："+m+"\n");
	}
}
